import axiosReq from '@/utils/axiosReq'
import request from '@/utils/request'

export function apiUploadFile(params) {
    return axiosReq({
        url: '/api/eraq/supply/file',
        headers: {
            'Content-type': 'application/json;charset=UTF-8'
        },
        data: params,
        method: 'post'
    });
}

export function apiListFile(unid, fileType) {
    return request({
        api: 'mgop.linewell.eraq.supplyFileList',
        url: '/api/eraq/supply/file/list',
        params: {unid, fileType},
        method: 'get'
    });
}

export function apiDeleteFile(unid, path) {
    return request({
        api: 'mgop.linewell.eraq.supplyFileDel',
        url: '/api/eraq/supply/file',
        params: {
            unid, path
        },
        method: 'delete'
    });
}
